<style>
    .table-adminlog tr td {
        word-break: break-all;
    }
</style>
<table class="table table-striped table-chapterdetail">
    <thead>
    <tr>
        <th style="text-align: center;">{$resourceName}</th>
    </tr>
    </thead>
    <tbody>
        {volist name="resource.items" id="vo" }
        <tr>
            <td width="90%">{$vo.templateSettings.content}</td>
            <td><a href="#" onclick="stopall();playAudio('{$resmain}{$vo.templateSettings.audioUrl}');return false;"><i class="fa fa-volume-up"></i></a></td>
        </tr>
        {volist name="vo.questions" id="vo2" }
        <tr>
            <td width="80%">{$vo2.trunk.body}</td>
            <td>
                {volist name="vo2.trunk.attachments" id="vo3" }
                {if $vo3.fileType==1}
                    <a href="javascript:"><img class="img-sm img-center" data-tips-image src="{$resmain}{$vo3.url}"></a>
                {/if}
                {if $vo3.fileType==2}
                <a href="#" class="audiosd" onclick="stopall();playAudio('{$resmain}{$vo3.url}');return false;"><i class="fa fa-volume-up"></i></a>
                {/if}
                {/volist}
            </td>
        </tr>
        {volist name="vo2.children" id="vo2" }
            <tr>
                <td width="80%">{$vo2.trunk.body}</td>
                <td>
                    {volist name="vo2.trunk.attachments" id="vo3" }
                    {if $vo3.fileType==1}
                        <a href="javascript:"><img class="img-sm img-center" data-tips-image src="{$resmain}{$vo3.url}"></a>
                    {/if}
                    {if $vo3.fileType==2}
                    <a href="#" class="audiosd" onclick="stopall();playAudio('{$resmain}{$vo3.url}');return false;"><i class="fa fa-volume-up"></i></a>
                    {/if}
                    {/volist}
                </td>
            </tr>
        {/volist}
         {/volist}
        {/volist}
    </tbody>
</table>
<div class="hide layer-footer">
    <label class="control-label col-xs-12 col-sm-2"></label>
    <div class="col-xs-12 col-sm-8">
        <button type="reset" class="btn btn-primary btn-embossed btn-close" onclick="Layer.closeAll();">{:__('Close')}</button>
    </div>
</div>
<script type="text/javascript">
    function playAudio(value){
        var audio = new Audio(value);
        audio.play();
    }
    function stopall(){
        var audio = new Audio(".audiosd");
        audio.pause();
    }
</script>
